 <?php
 /*
class Model_User extends Zend_Db_Table_Abstract{
    protected $_name="user";
    protected $_primary="id";
    public function listall(){
        return $this->fetchall()->toArray();
    }
    
    public function listuser(){
        $data = $this->select();
        $data->from("user",array("id","username"));
        
        $data->where("id>?",0);
        $data->Where("level=?",2);
        
        
        $data->order("id desc");
        $data->limit(3);
        $data = $this->fetchAll($data)->toArray();
        return $data;
    }
    
} 
*/
class Model_User{
    
    protected $db;
    public function __construct(){
        $this->db = Zend_Registry::get('db');
        
    }
    
    public function listall(){
        
        $sql = $this->db->query("SELECT * FROM user");
        return $sql->fetchAll();
        
    }
}